var console = {};
var modules = {};
var module = {};

console.log = print;
JSTRING = JSON.stringify;
JPARSE = JSON.parse;

function require(name)
{
	if(modules[name])
		return modules[name];

	module = {};
	os.eval_file("modules/" + name + ".js");
	if(module.exports == undefined)
		modules[name] = {};
	else
		modules[name] = module.exports;

	module = {};

	return modules[name];
}


if(Object != undefined){
	
	Object.extend = function(destination, source) {
		for (property in source) {
			destination[property] = source[property];
		}
		return destination;
	}

	Object.prototype.extend = function(object) {
		return Object.extend.apply(this, [this, object]);
	} 
}




require("timer");
